package com.example.demo.domain;

import lombok.Data;

/**
 * @author yrforest
 * @version 1.0
 * @description: TODO
 * @date 2025/7/16 16:42
 */
@Data
public class SearchUserResp {
    private Long id;
    private String username;
    private String avatar;
    private String phone;
    private String email;


    public static SearchUserResp convert(User user) {
        SearchUserResp searchUserResp = new SearchUserResp();
        searchUserResp.setId(user.getId());
        searchUserResp.setUsername(user.getUsername());
        searchUserResp.setAvatar(user.getAvatar());
        searchUserResp.setPhone(user.getPhone());
        searchUserResp.setEmail(user.getEmail());
        return searchUserResp;
    }
}
